<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html><head>
<meta http-equiv="Content-Language" content="en-us">

<title>The sandbox script</title><link rel="stylesheet" type="text/css" href="../style.css"></head>


<body>

<div align="center">
<table class="allEncompassingTable">
 <tbody><tr>
  <td>
<p><a href="../index.html" target="_top"><img src="images/homeImg.png"></a></p>



<h1>The sandbox script</h1>

<p>The sandbox script is quite similar to an <a href="addOns.htm">add-on</a>:
it is automatically loaded at program start-up, and allows CoppeliaSim's
functionality to be extended by user-written functionality or
functions. In addition to that, the sandbox script is extensively used in CoppeliaSim's  Lua commander plugin (read-eval-print loop), that adds a text input to the CoppeliaSim status bar, allowing entering and executing Lua code on the fly, like in a terminal. It is persistent across all opened scenes, and is executed
constantly, effectively running in the
background. For that reason, it should only execute minimalistic code everytime called, since the whole application would otherwise slow down.
The sandbox script is called via <a href="callbackFunctions.htm#systemCallbacks">system callback functions</a>, and follows a precise<a href="scriptExecution.htm"> execution order </a>in relation with other script types.</p>

<p>The sandbox script is loaded from <em>system/sndbxscpt.txt</em> at start-up, can run <a href="threadedAndNonThreadedCode.htm">threaded or non-threaded</a>, and should be segmented into several <a href="callbackFunctions.htm#systemCallbacks">system callback functions</a>. </p>


<br>
<br>
 </td></tr>
</tbody></table> 
</div>  
  
  
</body></html>